package com.ruoyi.piliangfahuo.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.piliangfahuo.mapper.BatchDeliveryMapper;
import com.ruoyi.piliangfahuo.domain.BatchDelivery;
import com.ruoyi.piliangfahuo.service.IBatchDeliveryService;

/**
 * 批量发货Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-11
 */
@Service
public class BatchDeliveryServiceImpl implements IBatchDeliveryService 
{
    @Autowired
    private BatchDeliveryMapper batchDeliveryMapper;

    /**
     * 查询批量发货
     * 
     * @param deliveryId 批量发货主键
     * @return 批量发货
     */
    @Override
    public BatchDelivery selectBatchDeliveryByDeliveryId(Long deliveryId)
    {
        return batchDeliveryMapper.selectBatchDeliveryByDeliveryId(deliveryId);
    }

    /**
     * 查询批量发货列表
     * 
     * @param batchDelivery 批量发货
     * @return 批量发货
     */
    @Override
    public List<BatchDelivery> selectBatchDeliveryList(BatchDelivery batchDelivery)
    {
        return batchDeliveryMapper.selectBatchDeliveryList(batchDelivery);
    }

    /**
     * 新增批量发货
     * 
     * @param batchDelivery 批量发货
     * @return 结果
     */
    @Override
    public int insertBatchDelivery(BatchDelivery batchDelivery)
    {
        batchDelivery.setCreateTime(DateUtils.getNowDate());
        return batchDeliveryMapper.insertBatchDelivery(batchDelivery);
    }

    /**
     * 修改批量发货
     * 
     * @param batchDelivery 批量发货
     * @return 结果
     */
    @Override
    public int updateBatchDelivery(BatchDelivery batchDelivery)
    {
        return batchDeliveryMapper.updateBatchDelivery(batchDelivery);
    }

    /**
     * 批量删除批量发货
     * 
     * @param deliveryIds 需要删除的批量发货主键
     * @return 结果
     */
    @Override
    public int deleteBatchDeliveryByDeliveryIds(Long[] deliveryIds)
    {
        return batchDeliveryMapper.deleteBatchDeliveryByDeliveryIds(deliveryIds);
    }

    /**
     * 删除批量发货信息
     * 
     * @param deliveryId 批量发货主键
     * @return 结果
     */
    @Override
    public int deleteBatchDeliveryByDeliveryId(Long deliveryId)
    {
        return batchDeliveryMapper.deleteBatchDeliveryByDeliveryId(deliveryId);
    }
}
